export namespace AuthModel {
  type GrantType = 'CAPTCHA' | 'MOBILE' | 'PASSWORD';

  /** 登录接口参数 */
  export interface LoginParams {
    username?: string;
    password?: string;
    code?: string;
    key?: string;
    grantType: GrantType;
    refreshToken?: string;
    mobile?: string;
  }

  export interface LoginResultVO {
    tenantId: string;
    token: string;
    uuid: string;
    refreshToken: string;
    expire: string;
    expiration: string;
  }

  export interface LogoutParams {
    token: null | string;
  }

  export interface RefreshParams {
    refreshToken: null | string;
  }

  export interface RegisterVO {
    code: string;
    key: string;
    password: string;
    confirmPassword: GrantType;
    nickName?: string;
  }

  export interface RegisterByMobileVO extends RegisterVO {
    mobile: string;
  }

  export interface RegisterByEmailVO extends RegisterVO {
    email: string;
  }
}
